import java.util.Scanner;
public class Task12 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int score1 = sc.nextInt();
		int score2 = sc.nextInt();
		int score3 = sc.nextInt();
		int sum = score1 + score2 + score3;
		
		if(sum == 0){
			System.out.println("No teams");
		}else {
		
			if (sum%3 == 0){
				System.out.println("Team N1: Yes");
			}else{
				System.out.println("Team N1: No");
			}
		}
		
		int teamNumber = 2;
		
		while (sum != 0){
			score1 = sc.nextInt();
			score2 = sc.nextInt();
			score3 = sc.nextInt();
			sum = score1 + score2 + score3;
			if(sum == 0){
				break;
			}
			System.out.print("Team N" + teamNumber +": ");
			if(sum % 3 ==0){
				System.out.println("Yes");
			}else{
				System.out.println("No");
			}
			teamNumber++;
		}
		
		sc.close();

	}

}
